package mianxiangduixiang.Week2;

import java.util.Scanner;

public class ReverseDigit {
    static Scanner scan = new Scanner(System.in);

    public static void main(String[] args) {
        String digitInput = scan.nextLine();
        reverseDigit(digitInput);
    }

    private static void reverseDigit(String digit) {
        char[] reverse = digit.toCharArray();
        for (int i = reverse.length - 1; i >= 0; i--) {
            System.out.print(reverse[i] + "");
        }
    }
}
